#include "test.pb.h"
#include <iostream>
#include <string>
using namespace fixbug;

int main(int argc, char *argv[])
{
    LoginResponse rsp;
    ResultCode *rc = rsp.mutable_result();
    rc->set_errcode(1);
    rc->set_errmsg("xxxx");

    return 1;
}

int main1(int argc, char *argv[])
{
    LoginRequest req;
    req.set_name("zhangsan");
    req.set_pwd("123456");
    std::string send_str;
    if(req.SerializeToString(&send_str))
    {
        std::cout << send_str.c_str() << std::endl;
    }

    LoginRequest reqB;
    if(reqB.ParseFromString(send_str))
    {
        std::cout << reqB.name() << std::endl;
        std::cout << reqB.pwd() << std::endl;
    }

    return 1;
}